package cn.model;

import cn.util.Toolsutil;

import java.sql.Timestamp;

public class TService {
    private int serviceid;
    private Integer equipid;
    private String serviceTime;
    private String userid;
    private String reasons;
    private Integer audit;

    public int getServiceid() {
        return serviceid;
    }

    public void setServiceid(int serviceid) {
        this.serviceid = serviceid;
    }

    public Integer getEquipid() {
        return equipid;
    }

    public void setEquipid(Integer equipid) {
        this.equipid = equipid;
    }

    public String getServiceTime() {
        return Toolsutil.GetDateFormat(serviceTime);
    }

    public void setServiceTime(String serviceTime) {
        this.serviceTime = serviceTime;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getReasons() {
        return reasons;
    }

    public void setReasons(String reasons) {
        this.reasons = reasons;
    }

    public Integer getAudit() {
        return audit;
    }

    public void setAudit(Integer audit) {
        this.audit = audit;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TService tService = (TService) o;

        if (serviceid != tService.serviceid) return false;
        if (equipid != null ? !equipid.equals(tService.equipid) : tService.equipid != null) return false;
        if (serviceTime != null ? !serviceTime.equals(tService.serviceTime) : tService.serviceTime != null)
            return false;
        if (userid != null ? !userid.equals(tService.userid) : tService.userid != null) return false;
        if (reasons != null ? !reasons.equals(tService.reasons) : tService.reasons != null) return false;
        if (audit != null ? !audit.equals(tService.audit) : tService.audit != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = serviceid;
        result = 31 * result + (equipid != null ? equipid.hashCode() : 0);
        result = 31 * result + (serviceTime != null ? serviceTime.hashCode() : 0);
        result = 31 * result + (userid != null ? userid.hashCode() : 0);
        result = 31 * result + (reasons != null ? reasons.hashCode() : 0);
        result = 31 * result + (audit != null ? audit.hashCode() : 0);
        return result;
    }
}
